package com.sbr.converter.demo;

import java.io.File;

import com.sbr.converter.PDFConverter;
import com.sbr.converter.components.impl.PDF2ExcelConverter;
import com.sbr.converter.components.impl.PDF2PPTConverter;
import com.sbr.converter.components.impl.PDF2WordConverter;
import org.junit.Test;

public class Demo {
	public static void main(String[] args) {
		
		//word转换为PDF
//		PDFConverter wordConverter = new PDF2WordConverter();
//		wordConverter.convert(new File("C:\\Users\\Administrator\\Desktop\\新建文件夹\\小屁孩.docx"), new File("C:\\Users\\Administrator\\Desktop\\新建文件夹\\小屁孩.pdf"));
		//wordConverter.convert(new File("F://test//CINCC平台管理接口规范-JSON-V1.2.1.doc"), new File("F://test//CINCC平台管理接口规范-JSON-V1.2.1.pdf"));
		//excel转换为PDF
		PDFConverter excelConverter = new PDF2ExcelConverter();
		excelConverter.convert(new File("C:\\Users\\Administrator\\Desktop\\新建文件夹\\2、滨海一期补偿明细表及分户报告（修正2020-2-18）.xlsx"),
				new File("C:\\Users\\Administrator\\Desktop\\2、滨海一期补偿明细表及分户报告（修正2020-2-18）.pdf"));
		//ppt转换为PDF
		//PDFConverter pptConverter = new PDF2PPTConverter();
		//pptConverter.convert(new File("/Users/caomei/Desktop/333.pptx"), new File("/Users/caomei/Desktop/333.pdf"));
	}

	@Test
	public void a(){
		PDFConverter excelConverter = new PDF2ExcelConverter();
		excelConverter.convert(new File("C:\\Users\\Administrator\\Desktop\\新建文件夹\\2、滨海一期补偿明细表及分户报告（修正2020-2-18）.xlsx"),
				new File("C:\\Users\\Administrator\\Desktop\\2、滨海一期补偿明细表及分户报告（修正2020-2-18）.pdf"));
	}

	@Test
	public void b(){
		PDFConverter wordConverter = new PDF2WordConverter();
		wordConverter.convert(new File("C:\\Users\\Administrator\\Desktop\\新建文件夹\\小屁孩.docx"), new File("C:\\Users\\Administrator\\Desktop\\新建文件夹\\小屁孩.pdf"));
	}
}
